package com.MovieManageSystem.service.implement;

import com.MovieManageSystem.domain.Movie;
import com.MovieManageSystem.mapper.MovieMapper;
import com.MovieManageSystem.service.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MovieServiceImpl implements MovieService {
    @Autowired
    private MovieMapper movieMapper;
    @Override
    public List<Movie> getMovieList(Movie movie) {
        return movieMapper.getMovieList(movie);
    }

    @Override
    public Movie selectMovieByVid(Long vid) {
        return movieMapper.selectMovieByVid(vid);
    }

    @Override
    public void insertMovie(Movie movie) {
        movieMapper.insertMovie(movie);
    }

    @Override
    public void updateMovie(Movie movie) {
        movieMapper.updateMovie(movie);
    }

    @Override
    public void deleteMovieByVids(Long[] vids) {
        movieMapper.deleteMovieByVids(vids);
    }

    @Override
    public int deleteMovieByVid(Long vid) {
        return movieMapper.deleteMovieByVid(vid);
    }
}
